package com.ruoyi.system.service;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.AppDynamicLike;
import com.ruoyi.system.domain.AppDynamicMsg;

/**
 * 点赞Service接口
 * 
 * @author ruoyi
 * @date 2023-02-27
 */
public interface IAppDynamicLikeService  extends IService<AppDynamicLike>
{
    /**
     * 查询点赞
     * 
     * @param id 点赞主键
     * @return 点赞
     */
    public AppDynamicLike selectAppDynamicLikeById(Long id);

    /**
     * 查询点赞列表
     * 
     * @param appDynamicLike 点赞
     * @return 点赞集合
     */
    public List<AppDynamicLike> selectAppDynamicLikeList(AppDynamicLike appDynamicLike);

    /**
     * 新增点赞
     * 
     * @param appDynamicLike 点赞
     * @return 结果
     */
    public int insertAppDynamicLike(AppDynamicLike appDynamicLike);

    /**
     * 修改点赞
     * 
     * @param appDynamicLike 点赞
     * @return 结果
     */
    public int updateAppDynamicLike(AppDynamicLike appDynamicLike);

    /**
     * 批量删除点赞
     * 
     * @param ids 需要删除的点赞主键集合
     * @return 结果
     */
    public int deleteAppDynamicLikeByIds(Long[] ids);

    /**
     * 删除点赞信息
     * 
     * @param id 点赞主键
     * @return 结果
     */
    public int deleteAppDynamicLikeById(Long id);

    int countByDynamicIdAndUserId(Long id, Long userId);

    AjaxResult addLikeDynamic(Long userId, Long dynamicId);

    AjaxResult cancelLikeDynamic(Long userId, Long dynamicId);
}
